package com.gulimall.product.domain.vo;

import com.gulimall.product.domain.entity.SkuImages;
import com.gulimall.product.domain.entity.SkuInfo;
import com.gulimall.product.domain.entity.SpuInfoDesc;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    //sku基本信息获取,pms_sku_info
    private SkuInfo skuInfo;
    //  sku的图片信息，pms_sku_images
    private List<SkuImages> skuImages;
    //获取spu的销售属性组合
    private List<SkuItemSaleAttrVo> saleAttrs;
    //获取spu的介绍
    private SpuInfoDesc spuInfoDesc;
    //获取spu的规格参数信息
    private List<SpuItemBaseAttrVo> spuItemBaseAttrVos;

    @Data
    public static class SkuItemSaleAttrVo{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class SpuItemBaseAttrVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }

    @Data
    public static class AttrValueWithSkuIdVo{
        private String attrValue;
        private String skuIds;
    }
}
